package com.sunfeng;

import lombok.extern.slf4j.Slf4j;

import java.util.concurrent.TimeUnit;

/**
 * @author sunfeng
 */
@Slf4j
public class TimeUtils {


    public static void sleep(long a) {
        try {
            TimeUnit.SECONDS.sleep(a);
        } catch (InterruptedException e) {
            log.error("sleep睡眠被打断");
        }
    }

    public static void sleepMicroseconds(long a) {
        try {
            TimeUnit.MICROSECONDS.sleep(a);
        } catch (InterruptedException e) {
            log.error("sleepMicroseconds睡眠被打断");
        }
    }
}
